{#snippet field(title, amount)}
{$t(title)}
{s(amount, userLocale)}
{f(toFiat(amount, rate), currency, userLocale)}
{/snippet}

{$t(amount < 0 ? "payments.sent" : "payments.received")}

{#if p.with} {direction}
{p.with.username}
{/if} {#if p.type === types.fund}
{direction}
{p.memo}
{/if} {@render field("payments.amount", a)} {#if tip} {@render field("invoice.tip", tip)} {@render field("payments.total", a + (tip || 0))} {/if} {@render field("payments.networkFee", fee)} {#if ourfee > 0} {@render field("payments.platformFee", ourfee)} {/if}
{$t("payments.date")}
{format(new Date(created), "h:mmaaa", { locale })} {format(new Date(created), "MMM d, yyyy", { locale })}
{#if type === types.ecash && amount < 0} {:else if memo}
{$t("payments.memo")}
{memo}
{/if} {#if type === types.lightning || type === types.bolt12}
{$t("payments.preimage")}
{ref}
{/if} {#if type === "bitcoin" || type === "liquid"}
Txid
{txid}
{/if} {#if path}
Path
{path}
{/if}